package Lee_code;

/**
 * @author blh
 * @date 2024年07月07日 22:20
 */
public class Lee_55_77 {
    public boolean canJump(int[] nums) {
        int len = nums.length;
        int curIndex = len - 1;
        for (int i = len - 2; i >= 0; i--) {
            if (nums[i] >= curIndex - i) {
                curIndex = i;
            }
        }
        return curIndex == 0;
    }
}
